#include<stdio.h>
int hanshu(int n)
{
	if(n==2)
	{
		return 4;
	}
	else
	{
		return 2*(hanshu(n-1)+1);
	}
}
int main ()
{
	int n;
	int result;
	while(scanf("%d",&n)!=EOF)
	{
		result=hanshu(n);
		printf("%d\n",result);
	}
	return 0;
}
